package com.astudio.lhasa.http;

import retrofit2.Retrofit;

public class HttpService {

    private static HttpService sInstance;

    private Retrofit retrofit;

    private HttpService() {

        retrofit = new Retrofit.Builder()
                .baseUrl("https://api.github.com/")
                .build();


    }

    public static void init() {
        if (sInstance == null) getInstance();
    }

    public static HttpService getInstance() {
        if (sInstance == null) {
            sInstance = new HttpService();
        }
        return sInstance;
    }

    public TourService getTourService() {
        return retrofit.create(TourService.class);
    }
}
